package com.myzuku.getmylocation.pro;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.LinearLayout;

public class TransparentPanel extends LinearLayout {

	
	@Override
	public boolean onTouchEvent(MotionEvent event) {
		super.onTouchEvent(event);
		
		int eventAction = event.getAction();
//		float x = event.getX();
//		float y = event.getY();
		
		switch (eventAction) {
		case MotionEvent.ACTION_DOWN:
			
			break;
		case MotionEvent.ACTION_MOVE:
			break;
			
		case MotionEvent.ACTION_UP:
			break;

		default:
			break;
		}
		
		
		return true;
	}

	public TransparentPanel(Context context) {
		super(context);
	}

	public TransparentPanel(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	@Override
	protected void dispatchDraw(Canvas canvas) {
		Paint innerPaint = new Paint();
		innerPaint.setARGB(225, 75, 75, 75);
		
		/*
		Paint borderPaint = new Paint();
		borderPaint.setARGB(255, 255, 255, 255);
		borderPaint.setAntiAlias(true);
		borderPaint.setStyle(Style.STROKE);
		borderPaint.setStrokeWidth(2);
		*/
		
		RectF drawRect = new RectF();
		drawRect.set(0, 0, getMeasuredWidth(), getMeasuredHeight());
		
		//canvas.drawRoundRect(drawRect, 5, 5, innerPaint);
		//canvas.drawRoundRect(drawRect, 5, 5, borderPaint);
		
		canvas.drawRect(drawRect, innerPaint);
		
		super.dispatchDraw(canvas);
	}
}
